# 字符串
string = "my name is bird"
value1 = string[3]
value2 = string[-5]
print(value1,value2)

#字符串同样不可修改
# string[1] = 'a'

#index
print(string.index("is"))

#repalce
print(string.replace("name","firstname"))

#split
str1 = "hello my name is python"
my_list = str1.split(" ")
print(my_list)

#strip,默认去除前后空格
str2 = "   hello world  "
new_str2 = str2.strip()
print(new_str2)

str3 = "12hello world21"
new_str3 = str3.strip("12")
print(new_str3)

#count
str2 = "hello my name is python"
print(str2.count("m"))

#len
print(len(str2))